package org.emet.jee.console.services.sys;

import org.emet.jee.console.dao.sys.ArchDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Transactional
@Service
public class ArchManager {

	@Autowired
	private ArchDao archDao;

	@Transactional(readOnly = true)
	public boolean archExists(Long id) {
		Integer number = archDao.findUnique("select 1 from Archive where id= ?", id);
		return (number != null) ? true : false;
	}
}
